Skip to content

Conversation

@eikaramba
Copy link

i am on windows and the environment variables setting syntax does not work like this in the package.json - there are ways around this. my favorite is pnpm and a option to automatically convert them. however i wanted to have this plain and easy and thus used the webpack parameter, which works across all OSes.

I also removed the webpack config path, because it is by default the one that was set, feel free to adapt it, if there was a reason for this.

I also need to include the following packages locally for my machine, not sure if they should be included, so i omited it from this PR:

"babel-loader": "^9.1.3",
"webpack": "^5.92.1",
"webpack-cli": "^5.1.4"

@AkshayRao27
Copy link

I was having massive trouble with Windows as well. I ended up deploying Debian inside WSL2 and am now using a WSL terminal for running everything. Not the best solution, but definitely a very convenient workaround :)

@eikaramba
Copy link
Author

i did run in inside docker to develop. docker run --rm -p 8080:80 -v D:/projects/cospend-nc:/var/www/html/apps-extra/cospend-nc ghcr.io/juliushaertl/nextcloud-dev-php81:latest

@AkshayRao27
Copy link

AkshayRao27 commented Aug 14, 2025

I have it set up like this right now on my Win11 PC:

  • Docker for Windows
  • WSL2 with Debian
  • Bind Mount my cospend directory so that I can make changes in windows
  • Run npm run dev inside a Debian Terminal in VS Code on Windows to compile.

If you want to try this approach, here's how I've set my compose file up:

services:
  db:
    image: mariadb:lts
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED
    environment:
      - MYSQL_ROOT_PASSWORD=devpassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=devpassword
    volumes:
      - db:/var/lib/mysql

  app:
    image: nextcloud
    restart: unless-stopped
    ports:
      - "8080:80"
    depends_on:
      - db
    environment:
      - MYSQL_HOST=db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=devpassword
    volumes:
      # Disable OPcache for dev
      - ./php-dev.ini:/usr/local/etc/php/conf.d/99-dev.ini:ro
      - ./cospend:/var/www/html/custom_apps/cospend:rw

volumes:
  db:

That ini File has:

opcache.enable=0
opcache.enable_cli=0
opcache.validate_timestamps=1
opcache.revalidate_freq=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants